﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using PcapDotNet.Core;

namespace MySQLQueryMonitor.Util
{
    class DeviceNameConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            LivePacketDevice device = value as LivePacketDevice;
            if (device == null)
            {
                return "Not selected.";
            }
            return device.Description;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
